package com.example.mapper;

import com.example.entity.Jiaoyi;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface JiaoyiMapper {
    List<Jiaoyi> findAll(@Param("name") String name, @Param("typeId") Integer typeId);

    @Delete("delete from jiaoyi where id = #{value}")
    void delete(Integer id);

    @Select("select * from jiaoyi where id=#{value}")
    Jiaoyi getById(Integer id);

    void update(Jiaoyi jiaoyi);
}
